import Vue from 'vue'
import Vuex from 'vuex'
import user from './modules/user'
import persistedstate from 'vuex-persistedstate'
Vue.use(Vuex)

export default new Vuex.Store({
  state: {},
  getters: {},
  mutations: {},
  actions: {},
  modules: {
    user
  },
  plugins: [
    persistedstate({
      paths: ['user.tokenObj', 'user.num']
      // paths: ['user'] // 整个user模块持久化
    })
  ]
})
